/**
 * 
 */
package com.jquery.ui.tags.beans.script;



import java.util.Map;

import com.jquery.ui.core.bean.UIBean;
import com.jquery.ui.dictionary.IDataType;
import com.jquery.ui.uitls.StringUtils;

/**
 * @author linyajun
 * 
 * @date	2013-10-10
 * @description   
 */
public class GridScriptUI extends UIBean {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4003702159287914103L;

	private String url;
	private IDataType datatype;
	private int rowNum=10;
	private String rowList="[10,20,30]";
	private Boolean viewrecords=true;
	private String title;
	
	

	@Override
	public void putAttribute(Map<String, Object> attribute) {
		if (StringUtils.isNotEmpty(url)) {
			attribute.put("url", url);
		}
		if (StringUtils.isNotEmpty(rowList)) {
			attribute.put("rowList", rowList);
		}
		if (StringUtils.isNotEmpty(title)) {
			attribute.put("title", title);
		}
		attribute.put("rowNum", rowNum);
		attribute.put("viewrecords", viewrecords);
		

	}
	/**
	 * @return the url
	 */
	public String getUrl() {
		return url;
	}
	/**
	 * @param url the url to set
	 */
	public void setUrl(String url) {
		this.url = url;
	}
	/**
	 * @return the datatype
	 */
	public IDataType getDatatype() {
		return datatype;
	}
	/**
	 * @param datatype the datatype to set
	 */
	public void setDatatype(IDataType datatype) {
		this.datatype = datatype;
	}
	/**
	 * @return the rowNum
	 */
	public int getRowNum() {
		return rowNum;
	}
	/**
	 * @param rowNum the rowNum to set
	 */
	public void setRowNum(int rowNum) {
		this.rowNum = rowNum;
	}
	/**
	 * @return the rowList
	 */
	public String getRowList() {
		return rowList;
	}
	/**
	 * @param rowList the rowList to set
	 */
	public void setRowList(String rowList) {
		this.rowList = rowList;
	}
	/**
	 * @return the viewrecords
	 */
	public boolean isViewrecords() {
		return viewrecords;
	}
	/**
	 * @param viewrecords the viewrecords to set
	 */
	public void setViewrecords(boolean viewrecords) {
		this.viewrecords = viewrecords;
	}
	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}
	/**
	 * @param title the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}
	
	
	

}
